let express=require('express');
let router=express.Router();
let db=require('../sql.js');

router.get('/',function (req,res,next){
    db.query('select * from goods',function (err,data){
        if(err){                  //                `
            throw err;                  //                `
        }else{                              //                `
            res.render('goods',{goods:data});
        }
    })
    // res.render('goods');
});



module.exports=router;
